package com.guodefu.demo.config;

import org.testcontainers.containers.PostgreSQLContainer;

/**
 * 为了支持固定的端口暴露而添加的扩展类
 */
public class MyPostgreSQLContainer extends PostgreSQLContainer<MyPostgreSQLContainer> {

    public MyPostgreSQLContainer(String dockerImageName) {
        super(dockerImageName);
    }

    public MyPostgreSQLContainer withFixedExposedPort(int hostPort, int containerPort) {
        super.addFixedExposedPort(hostPort, containerPort);
        return this;
    }
}
